import { Popconfirm } from 'antd';

interface IDelProps {
  onRemove: () => void;
  children: JSX.Element;
}

const DeleteWrapper = (props: IDelProps) => {
  const { onRemove } = props;
  return (
    <>
      <Popconfirm title="确认删除？" onConfirm={onRemove}>
        {props.children}
      </Popconfirm>
    </>
  );
};

export default DeleteWrapper;
